cmake_minimum_required(VERSION 3.15)
project(SearchTrees LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 包含头文件路径
include_directories(${PROJECT_SOURCE_DIR}/include)

# 查找所有源文件
file(GLOB SOURCES "src/*.cpp")

# 为每个源文件生成可执行文件
foreach(SRC ${SOURCES})
    get_filename_component(NAME ${SRC} NAME_WE)
    add_executable(${NAME} ${SRC})
    target_include_directories(${NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include)
endforeach()
